#include "file_manager.h"
#include "uvlog.h"
#include "index_manager.h"
#include "utils.h"
#include <sstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <iostream>

using namespace std;


int main(int argc,char** argv){
	if(argc != 4){
		cout << "usage:" << argv[0]  << " [path] [prefix] [seq]" << endl;
		return -1;
	}
	
	INIT_LOG("/dev/null",1024*1024,5);
	
	cout << "create file,please wait..." << endl;
	if(IndexManager::createFile(argv[1],argv[2],atoi(argv[3])) != 0){
		cout << "create file failed:" << strerror(errno) << endl;
	}
	
	cout << "create file success" << endl;
}
